package com.wish.finance.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wish.finance.entity.TCwHailianDealPerDay;
import com.wish.finance.entity.vo.CwDetailVo;
import com.wish.finance.entity.vo.DealPerDayVo;
import com.wish.finance.mapper.TCwHailianDealPerDayMapper;
import com.wish.finance.service.ITCwHailianDealPerDayService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 海链财务报表(批处理对线上收入每天分类汇总统计一条记录，目前只有线上收入) 服务实现类
 * </p>
 *
 * @author benjamin
 * @since 2022-04-01
 */
@Service
public class TCwHailianDealPerDayServiceImpl extends ServiceImpl<TCwHailianDealPerDayMapper, TCwHailianDealPerDay> implements ITCwHailianDealPerDayService {

    @Override
    public DealPerDayVo stats(DealPerDayVo qv) {
        return getBaseMapper().stats(qv);
    }

    @Override
    public List<DealPerDayVo> statsList(DealPerDayVo qv) {
        return getBaseMapper().statsList(qv);
    }

    @Override
    public PageInfo<CwDetailVo> cwDetails(CwDetailVo qv) {
        PageHelper.startPage(qv.getPageNum(), qv.getPageSize());
        List<CwDetailVo> list = getBaseMapper().cwDetails(qv);
        PageInfo<CwDetailVo> pg = new PageInfo<>(list);
        return pg;
    }

    @Override
    public CwDetailVo countAmount(CwDetailVo qv) {
        return getBaseMapper().countAmount(qv);
    }
}
